const Router = require('@koa/router');
const userController = require('../controller/user.controller');
const auth = require('../middleware/auth');

const router = new Router({
  prefix: '/api/users'
});

// 获取用户列表
router.get('/', auth, userController.getUsers);

// 创建用户
router.post('/', auth, userController.createUser);

// 更新用户
router.put('/:id', auth, userController.updateUser);

// 删除用户
router.delete('/:id', auth, userController.deleteUser);

// 重置密码
router.post('/:id/reset-password', auth, userController.resetPassword);

module.exports = router; 